﻿using System;
using System.Collections.Generic;

namespace UniRx
{
	// Token: 0x0200037B RID: 891
	[Serializable]
	public struct Pair<T> : IEquatable<Pair<T>>
	{
		// Token: 0x06001223 RID: 4643 RVA: 0x00052E9C File Offset: 0x0005129C
		public Pair(T previous, T current)
		{
			this.previous = previous;
			this.current = current;
		}

		// Token: 0x1700010B RID: 267
		// (get) Token: 0x06001224 RID: 4644 RVA: 0x00052EAC File Offset: 0x000512AC
		public T Previous
		{
			get
			{
				return this.previous;
			}
		}

		// Token: 0x1700010C RID: 268
		// (get) Token: 0x06001225 RID: 4645 RVA: 0x00052EB4 File Offset: 0x000512B4
		public T Current
		{
			get
			{
				return this.current;
			}
		}

		// Token: 0x06001226 RID: 4646 RVA: 0x00052EBC File Offset: 0x000512BC
		public override int GetHashCode()
		{
			EqualityComparer<T> @default = EqualityComparer<T>.Default;
			int hashCode = @default.GetHashCode(this.previous);
			return (hashCode << 5) + hashCode ^ @default.GetHashCode(this.current);
		}

		// Token: 0x06001227 RID: 4647 RVA: 0x00052EF0 File Offset: 0x000512F0
		public override bool Equals(object obj)
		{
			return obj is Pair<T> && this.Equals((Pair<T>)obj);
		}

		// Token: 0x06001228 RID: 4648 RVA: 0x00052F0C File Offset: 0x0005130C
		public bool Equals(Pair<T> other)
		{
			EqualityComparer<T> @default = EqualityComparer<T>.Default;
			return @default.Equals(this.previous, other.Previous) && @default.Equals(this.current, other.Current);
		}

		// Token: 0x06001229 RID: 4649 RVA: 0x00052F4D File Offset: 0x0005134D
		public override string ToString()
		{
			return string.Format("({0}, {1})", this.previous, this.current);
		}

		// Token: 0x04000AF5 RID: 2805
		private readonly T previous;

		// Token: 0x04000AF6 RID: 2806
		private readonly T current;
	}
}
